package com.cong.clause.mapper;

import com.cong.clause.pojo.Clause;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author cong
 * <p>
 * created on 2021/4/16 下午8:32
 */
@Mapper
public interface ClauseMapper {

    /**
     * 保存
     * @param clause
     * @return
     */
    @Insert("insert into clause(name,mark) value(#{name},#{mark})")
    int save(Clause clause);


    /**
     * 查询是否已经存在
     * @param name
     * @param mark
     * @return
     */
    @Select("select id,name,mark from clause where name=#{name} and mark=#{mark}")
    Clause queryOneByNameAndMark(String name,String mark);
}
